
package edu.imac.angryfood.shapes;

import org.jbox2d.collision.CircleDef;


/** 
 * A shape defining a circle to be used for a collision. 
 * 
 */
public class Circle extends PrimitiveShape<CircleDef> {
	/**
	 * Constructor with just the radius
	 * @param radius
	 */
	public Circle(float radius) {
		this(radius, DEFAULT_DENSITY, DEFAULT_RESTIUTION, DEFAULT_FRICTION);
	}
	/**
	 * Constructor
	 * @param radius
	 * @param density
	 */
	public Circle(float radius, float density) {
		this(radius, density, DEFAULT_RESTIUTION, DEFAULT_FRICTION);
	}
	/**
	 * Constructor
	 * @param radius
	 * @param density
	 * @param resitution
	 */
	public Circle(float radius, float density, float resitution) {
		this(radius, density, resitution, DEFAULT_FRICTION);
	}
	
	/**
	 * Constructor
	 * @param radius
	 * @param density
	 * @param restitution
	 * @param friction
	 */
	public Circle(float radius, float density, float restitution, float friction) {
		super(new CircleDef());
		
		getDef().radius = radius;
		getDef().density = density;
		getDef().restitution = restitution;
		getDef().friction = friction;
		
		slickShape = new org.newdawn.slick.geom.Circle (0, 0, radius);

	}

	/**
	 * get the radius
	 * @return
	 */
	public float getRadius() {
		return getDef().radius;
	}
}
